



#ifndef SAR_KERNEL_VM_VM_H
#define SAR_KERNEL_VM_VM_H

#include "agent.h"

#include <kernel/userid/userid.h>
#include <kernel/handle/handle.h>

typedef struct VM {
	userid ID;
	handle WaitQueue;
	vm_Agent **AgentTable;
	size AgentTableSize;
} vm;


vm *vm_request (const char *_name);
void vm_release (vm *);

int vm_call (const char *_caller, const char *_callee);
int vm_load (vm *_vm, handle _bytestream);
int vm_run (vm *_vm);
int vm_spawn (vm *_vm, const char *_agent);


#endif
